#!/usr/bin/env python
#-*- coding:utf-8 -*-

"""
Animated dot.
"""

from __future__ import division

from tools import *
from visualise import *
from drawing import *

def main():
	X, Y = 300, 300

	viewer = Viewer("moving thing")
	while 1:
		image = zeros((X, Y,3))

		t = time.time()
		x = X/3*cos(t)+X/2
		y = Y/3*sin(t)+Y/2
		draw_circles(image, [(x,y)], fill=True)

		viewer.update_image(image)
		viewer.draw()
		if not viewer.alive:
			break

if __name__ == '__main__':
	main()
